package com.neusoft.serviceImp;

import com.neusoft.mapper.SysEmployeeMapper;
import com.neusoft.pojo.SysEmployee;
import com.neusoft.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired(required = false)
    SysEmployeeMapper sysEmployeeMapper;

    @Override // 查询所有员工信息
    public List<SysEmployee> list() {
        return sysEmployeeMapper.getSysEmployee();
    }
    @Override // 根据条件查询员工信息
    public List<SysEmployee> searchList(String name, String status, String dept) {
        return sysEmployeeMapper.getSysEmployeeBySearch(name, status, dept);
    }
    @Override // 删除员工信息【本质是修改visibility】
    public void deleteEmployee(String[] delArr) {
        sysEmployeeMapper.deleteEmployee(delArr);
    }
    @Override // 获取所有部门名称
    public List<String> depts() {
        return sysEmployeeMapper.getDepts();
    }
    @Override // 添加员工信息
    public void addEmployee(SysEmployee emp) {
        sysEmployeeMapper.addEmployee(emp);
    }
    @Override // 编辑员工信息
    public void updateEmployee(SysEmployee info) {
        sysEmployeeMapper.updateEmployee(info);
    }
    @Override // 添加待入职员工信息
    public void insertWaitingEmployee(SysEmployee waitingEmployee) {
        sysEmployeeMapper.insertWaitingEmployee(waitingEmployee);
    }
    @Override // 办理入职
    public void handleInduction(String[] inductions, String status, String entryDate) {
        sysEmployeeMapper.handleInduction(inductions, status, entryDate);
    }
    @Override // 编辑待入职页面员工信息
    public void updateInduction(SysEmployee info) {
        sysEmployeeMapper.updateInduction(info);
    }

    @Override
    public void singleQuit(String workerId) {
        sysEmployeeMapper.singleQuit(workerId);
    }

    @Override
    public List<SysEmployee> searchByName(String name, String status) {
        return sysEmployeeMapper.searchByName(name, status);
    }

    @Override
    public List<SysEmployee> searchByIsTry(String name) {
        return sysEmployeeMapper.searchByIsTry(name);
    }

    @Override
    public void updateProbation(SysEmployee info) {
        sysEmployeeMapper.updateProbation(info);
    }

    @Override
    public void updateDeptOrPost(String dept, String post, String workerId) {
        sysEmployeeMapper.updateDeptOrPost(dept, post, workerId);
    }

    @Override
    public void quit(String[] quitIds) {
        sysEmployeeMapper.quit(quitIds);
    }


    @Override // 转正
    public void becomeFullMember(String[] becomeFulls, String formalDate) {
        sysEmployeeMapper.becomeFullMember(becomeFulls, formalDate);
    }

    @Override // 查询所有待入职员工
    public List<SysEmployee> waitingList() {
        return sysEmployeeMapper.waitingList();
    }


}
